﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Tulde.WindowsPhone.Music.ViewModel;

namespace Tulde.WindowsPhone.Music.Mp3Tunes
{
    public enum AuthenticationOperations
    {
        login
    }
    public class AuthenticationService : BaseDataService<AuthenticationOperations>
    {
        protected override object DeserializeResult(string result)
        {
            if (!String.IsNullOrEmpty(result))
                return ViewModelSerializerFactory.Instance.Deserialize<AuthenticationToken>(result);
            else
            {
                return new AuthenticationToken
                {
                     Status = 0
                };
            }
        }
        protected override string BaseUrl
        {
            get
            {
                return "https://shop.mp3tunes.com/api/v1/";
            }
        }
    }
}
